#!/bin/bash

business_id="8b59c96af69f4d0b84cc35d60414dde9"
CUSTOMER_ID="837811552372"
CUSTOMER_NAME="NULL"
COMPANY_ID="245061795901"
COMPANY_NAME="autotest-bee"
DEPT_ID="71596"
DEPT_NAME="部门2"
EMPLOY_ID_PRE=1
LICENSE_TYPE="居民身份证"
SERVICE_CODE="PTS_JG_SWXD"
SERVICE_TYPE="01"
CONSUME_TIME="date_sub(NOW(), interval 1 MONTH)"
ACTION_TYPE="IIT_CALCULATE"
subdivision_action_type="normalSalarySpecIncome"
create_time=""
status="untreated"
last_modified="null"

USER_NUM=1000

for ((i = 0 ; i <= ${USER_NUM} ; i++));
do
  EMPLOY_ID=$((${EMPLOY_ID_PRE} + 1))
  LICENSE_NUMBER=${CUSTOMER_ID}_${i}
  sql="INSERT INTO oec_consume_pts_original_record ( \`business_id\`, \`customer_id\`, \`customer_name\`, \`company_id\`, \`company_name\`, \`dept_id\`, \`dept_name\`, \`employee_id\`, \`license_type\`, \`license_number\`, \`service_code\`, \`service_type\`, \`consume_time\`, \`action_type\`, \`subdivision_action_type\`, \`create_time\`, \`status\`, \`last_modified\`)
  VALUES ( '${business_id}', '${CUSTOMER_ID}', NULL, '${COMPANY_ID}', '${COMPANY_NAME}', '${DEPT_ID}',
  '部门2', '${EMPLOY_ID}', '${LICENSE_TYPE}', '${LICENSE_NUMBER}', '${SERVICE_CODE}', '${SERVICE_TYPE}',
  ${CONSUME_TIME}, '${ACTION_TYPE}', '${subdivision_action_type}', now(), '${status}', null);"

   echo ${sql} >> oec_data.sql
done

